/PROG  PNS0017
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "LYRA_6895/97";
PROG_SIZE	= 3262;
CREATE		= DATE 23-02-22  TIME 10:18:24;
MODIFIED	= DATE 25-04-09  TIME 14:05:48;
FILE_NAME	= PNS0043;
VERSION		= 0;
LINE_COUNT	= 114;
MEMORY_SIZE	= 3734;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R12 ;
   6:  !  PROGRAM: PNS0043 ;
   7:  !  PART:53151726/5983  ;
   8:  !*HL_20150625******************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14:CG SENSETIVE]=90    ;
  13:  R[18:PICK TIME BEFORE]=1    ;
  14:  R[19:DROP TIME BEFORE]=.2    ;
  15:   ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[3] ;
  23:  R[5:SPEED]=10    ;
  24:  OVERRIDE=R[5:SPEED] ;
  25:  !INITIATE TO PICK-POUNCE ;
  26:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  27:J P[2:PICK POUNCE] 50% CNT100 ACC100 BREAK    ;
  28:  R[1:CYCLE TOTAL]=0    ;
  29:  TIMER[1]=RESET ;
  30:  TIMER[1]=START ;
  31:   ;
  32:  LBL[10:TOP OF LOOF] ;
  33:  OVERRIDE=R[5:SPEED] ;
  34:   ;
  35:  TIMER[3]=STOP ;
  36:  TIMER[2]=STOP ;
  37:  R[1:CYCLE TOTAL]=R[1:CYCLE TOTAL]+1    ;
  38:  R[2:LAST CYCLE TIME]=TIMER[2]    ;
  39:  R[3:LAST SPM]=60/R[2:LAST CYCLE TIME]    ;
  40:  R[8:R MOVE TIME]=TIMER[3]    ;
  41:  TIMER[2]=RESET ;
  42:  TIMER[2]=START ;
  43:  TIMER[3]=RESET ;
  44:   ;
  45:  !PROCEED TO PICK ;
  46:  LBL[20] ;
  47:  IF DI[1:P1 PICK ENTRY OK]=ON AND DI[3:FROM RL1 CLEAR]=ON AND DI[8:P1 PICK START]=ON,JMP LBL[25] ;
  48:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
  49:  JMP LBL[20] ;
  50:   ;
  51:  LBL[25] ;
  52:  R[5:SPEED]=100    ;
  53:  OVERRIDE=R[5:SPEED] ;
  54:J P[3:PICK APPROACH] 100% CNT100 ACC100    ;
  55:   ;
  56:J P[4:PICK] 100% CNT0 TB R[18]sec,CALL PARTPICK ACC110 BREAK    ;
  57:  PAYLOAD[4] ;
  58:  CALL CHK_PICK    ;
  59:  MONITOR Z_CHECH ;
  60:J P[5:PICK DEPART] 100% CNT80 ACC100 TA R[20]sec,DO[5:TO RL1 DROP START]=PULSE,1.0sec    ;
  61:  DO[8:P1 PARTS OUT]=PULSE,1.0sec ;
  62:   ;
  63:J P[7:PICK CLEAR] 100% CNT100 ACC100    ;
  64:   ;
  65:  LBL[30:GOTO DROP POUNCE] ;
  66:J P[8:DROP POUNCE] 100% CNT100 ACC100 BREAK    ;
  67:   ;
  68:  TIMER[3]=STOP ;
  69:  LBL[40:AT DROP POUNCE] ;
  70:  IF DI[2:P2 DROP ENTRY]=ON AND DI[4:FROM R23 CLEAR]=ON AND DI[5:P2 DROP START]=ON,JMP LBL[80] ;
  71:  IF DI[7:PRESS STAMPING COMPLETE]=ON AND DI[2:P2 DROP ENTRY]=ON,JMP LBL[50] ;
  72:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[60] ;
  73:  JMP LBL[40] ;
  74:   ;
  75:  LBL[50:MOVE DROP SNEAK] ;
  76:  TIMER[3]=START ;
  77:  OVERRIDE=R[5:SPEED] ;
  78:J P[9:DROP SNEAK] 100% CNT100 ACC100 BREAK    ;
  79:  LBL[51:DROP OR C-P-S] ;
  80:   ;
  81:  IF DI[2:P2 DROP ENTRY]=ON AND DI[4:FROM R23 CLEAR]=ON AND DI[5:P2 DROP START]=ON,JMP LBL[80] ;
  82:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[40] ;
  83:  JMP LBL[51] ;
  84:  JMP LBL[50] ;
  85:   ;
  86:  LBL[60:MOVE CLS-PRS-ACC] ;
  87:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  88:  PAUSE ;
  89:  JMP LBL[40] ;
  90:   ;
  91:  LBL[80:DROP ENABLED] ;
  92:  TIMER[3]=START ;
  93:  !PROCEED TO DROP ;
  94:  OVERRIDE=R[5:SPEED] ;
  95:J P[10:DROP APPROACH] 100% CNT65 ACC100    ;
  96:  MONITOR END Z_CHECH ;
  97:J P[11:DROP] 100% CNT5 TB R[19]sec,CALL PARTDROP ACC100    ;
  98:  DO[6:PART DROP COMPLETE]=PULSE,1.0sec ;
  99:  PAYLOAD[3] ;
 100:J P[12:DROP DEPART] 100% CNT100 ACC130 TA   0.00sec,DO[7:PRESS STAMPING START]=PULSE,1.0sec    ;
 101:  CALL CHK_DROP    ;
 102:J P[13:DROP CLEAR] 100% CNT100 ACC130    ;
 103:  !GOTO PICK POUNCE ;
 104:J P[2:PICK POUNCE] 100% CNT100 ACC100 BREAK    ;
 105:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
 106:  JMP LBL[10] ;
 107:   ;
 108:  LBL[90:END OF CYCLE] ;
 109:  TIMER[1]=STOP ;
 110:  R[4:TOTAL CYCLE TIME]=TIMER[1]    ;
 111:J P[1:MIDDLE] 50% CNT100 ACC150    ;
 112:  MOVE TO HOME    ;
 113:   ;
 114:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  1986.203  mm,	Y =    -8.098  mm,	Z = -1015.211  mm,
	W =  -179.183 deg,	P =     1.681 deg,	R =  -179.587 deg,
	E1=   104.349 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2072.359  mm,	Y =  1568.735  mm,	Z = -1152.206  mm,
	W =   179.321 deg,	P =     1.370 deg,	R =   150.805 deg,
	E1=   134.033 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2602.498  mm,	Y =  3287.399  mm,	Z = -1072.097  mm,
	W =   179.349 deg,	P =     -.458 deg,	R =    94.487 deg,
	E1=   186.126 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2602.498  mm,	Y =  3287.399  mm,	Z = -1201.292  mm,
	W =   179.349 deg,	P =     -.458 deg,	R =    94.487 deg,
	E1=   186.126 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2602.498  mm,	Y =  3287.397  mm,	Z = -1050.178  mm,
	W =   179.349 deg,	P =     -.458 deg,	R =    94.487 deg,
	E1=   186.126 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2207.888  mm,	Y =  1678.103  mm,	Z = -1033.617  mm,
	W =   179.209 deg,	P =     1.133 deg,	R =   140.195 deg,
	E1=   144.334 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2048.564  mm,	Y = -1258.484  mm,	Z = -1010.640  mm,
	W =  -178.096 deg,	P =     1.000 deg,	R =  -157.691 deg,
	E1=    82.388 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2290.630  mm,	Y = -2461.622  mm,	Z = -1002.533  mm,
	W =  -178.379 deg,	P =     -.438 deg,	R =  -123.598 deg,
	E1=    48.386 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2651.746  mm,	Y = -3301.234  mm,	Z = -1085.429  mm,
	W =  -179.297 deg,	P =    -1.000 deg,	R =   -90.168 deg,
	E1=    10.904 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2651.736  mm,	Y = -3301.233  mm,	Z = -1180.674  mm,
	W =  -179.297 deg,	P =    -1.000 deg,	R =   -90.168 deg,
	E1=    10.905 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2651.745  mm,	Y = -3301.234  mm,	Z = -1100.340  mm,
	W =  -179.297 deg,	P =    -1.000 deg,	R =   -90.168 deg,
	E1=    10.904 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2196.917  mm,	Y = -1345.636  mm,	Z = -1123.429  mm,
	W =  -178.756 deg,	P =      .572 deg,	R =  -145.760 deg,
	E1=    70.638 deg
};
/END
